﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Configuration;

namespace StudentMgmt.Model.DataContext
{
    [Database(Name = "StuMgt")]
    public class StudentMgmtDataContext : System.Data.Linq.DataContext
    {
        public StudentMgmtDataContext()
            : base(ConfigurationManager.ConnectionStrings["SQLProfileConnString"].ConnectionString)
        {
        }

        public Table<StudentInfo> Students
        {
            get { return this.GetTable<StudentInfo>(); }
        }

        public Table<DepartmentInfo> Departments
        {
            get { return this.GetTable<DepartmentInfo>(); }
        }

        public Table<ClassInfo> Classes
        {
            get { return this.GetTable<ClassInfo>(); }
        }
        

        public Table<PunishmentInfo> Punishment
        {
            get { return this.GetTable<PunishmentInfo>(); }
        }

        public Table<ChangeInfo> Changes
        {
            get { return this.GetTable<ChangeInfo>();  }
        }

        public Table<Change_ConfigInfo> ChangeConfig
        {
            get {  return this.GetTable<Change_ConfigInfo>(); }
        }

        public Table<RewardInfo> Rewards
        {
            get { return this.GetTable<RewardInfo>();}
        }
        public Table<Reward_ConfigInfo> RewardConfig
        {
            get { return this.GetTable<Reward_ConfigInfo>();}
        }
    }
}
